The present invention relates to a method of measuring a three-dimensional shape of an object on the basis of image recognition, and more specifically to a three-dimensional measuring method suitable for use in measuring line-shaped objects such as bonded wires, for instance, arranged in any given direction.
When a three-dimensional shape is measured on the basis of image recognition, a method referred to as a stereoscopic view is adopted in general. In this method, as shown in FIG. 1, images of an object 1-1 in a three-dimensional space are taken by two cameras 1-11 and 1-12, and the three-dimensional coordinates are obtained on the basis of two-dimensional positions on both the image planes taken by the cameras. In FIG. 1, P1-11 and P1-12 denote images obtained by these two cameras 1-11 and 1-12.
In this method, when an object 1-1 to be measured is a point as shown in FIG. 1, it is possible to deduce the three-dimensional position in a space by relatively simply obtaining two-dimensional positions on both the image planes. However, when an object 2-1 is a line in shape as shown in FIG. 2, it is not easy to deduce the three-dimensional position of the line-shaped object 2-1 because it is difficult to determine the same points of the object 2-1 on the respective image planes.
To overcome this problem, a method of using an epipolar line has been known. This epipolar line object is a line obtained when a line of sight 3-1 through 1-1 along which the one camera 1-12 is seeing object 1-1 is imaginarily taken by the other camera 1-11, as shown in FIG. 3, which can be obtained as an epipolar line 3-2 on an image plane P1-11 of the camera 1-11. That is, since the object 1-1 exists on the line of sight 3-1 and further the epipolar line 3-2 is the line obtained by taking an image of the line of sight 3-1 with the camera 1-11, this epipolar line 3-2 indicates that an image of the object 1-1 exists always on this epipolar line 3-2 on the image plane P1-11 of the camera 1-11. By application of this epipolar line, when an object 4-1 to be taken is a line in shape, it is possible to determine that a point 4-2 on one image plane P1-12 and a point 4-3 on the other image plane P1-11 are the same point of the object 4-1, by determining the point 4-2 on the image of the object 4-1 on the image plane P1-12 of the camera 1-12, obtaining an epipolar line 3-2 corresponding to the line 3-1 of sight on the image plane P1-11 of the camera 1-11, and obtaining an intersection 4-3 between the image of the object 4-1 and the epipolar line 3-2 on the image plane P1-11 of the camera 1-11.
However, the inclination of this epipolar line 3-2 on the image plane P1-11 of the camera 1-11 is unconditionally determined on the basis of the positional relationship between the two cameras 1-11 and 1-12 and the point 4-2, without being subjected to the influence of the shape and direction of the object 4-1.
Consequently, when the intersection 4-3 is required with a high degree of precision, it is indispensable to adjust the mutual positional relationship between the cameras 1-11 and 1-12 and the object 4-1 so that the intersectional angle becomes as close to a right angle as possible. Therefore, when a line-shaped object extending in any given direction is required to be measured three-dimensionally, the positional relationship between the cameras 1-11 and 1-12 and the object 4-1 must be adjusted, thus complicated processing is required to automatically measure line-shaped objects.